package wang.aweb.childcar.service;

import com.github.pagehelper.PageInfo;
import wang.aweb.childcar.model.pojo.Device;
import wang.aweb.childcar.model.query.DeviceParam;
import wang.aweb.childcar.model.req.FenceDeviceReq;
import wang.aweb.childcar.model.vo.DeviceVO;

import java.util.Date;
import java.util.List;

public interface DeviceService {
    PageInfo getList(Integer page, Integer limit, DeviceParam deviceParam);

    void delete(Integer id);

    void update(Device device);

    void add(Device device);

    Device findByName(String name);

    Device findByImei(String imei);

    void disableOrEnable(Integer id);

    Device findById(Integer id);

    Integer getFenceId(Integer id);

    void checkImei(String imei);

    void updateStatus(Integer id, int status);

    List<DeviceVO> getAll();

    List<Device> getListByFenceId(Integer id);

    void setDeviceFenceIds(FenceDeviceReq fenceDeviceReq);
    void setDeviceFenceId(FenceDeviceReq fenceDeviceReq);

    DeviceVO findVOById(Integer id);

    List<Device> selectByAgentId(Integer id);

    Integer getDeviceCount();

    Integer getFreeCount();

    Integer getAgentDeviceCount(Integer agentId, Date starttime, Date endtime);
}
